export interface ResponseData {
  code: number
  message: string
  ok: boolean
}

export interface UserRecords {
  id: number
  createTime: string
  updateTime: string
  username: string
  password: string
  name: string
  phone?: string
  roleName: string
}
export interface UserData extends ResponseData {
  data: {
    records: UserRecords[]
    total: number
    size: number
    current: number
    orders: []
    optimizeCountSql: boolean
    hitCount: boolean
    searchCount: boolean
    pages: boolean
  }
}

// 添加或修改新用户
export interface AddNewData {
  id?: number | string
  name: string
  password?: string
  phone?: string
  roleName: string
  username: string
}
//获取用户角色数据和所有角色数据
export interface getRole extends ResponseData {
  data: DataRol
}
export interface DataRol {
  assignRoles: assignRoles
  allRolesList: assignRoles
}
export type assignRoles = allRoles[]
export interface allRoles {
  id: number
  createTime: string
  updateTime: string
  roleName: string
  remark: null
}
//修改用户角色或分配
export interface UpdateRoles {
  roleIdList: number[]
  userId: number
}
